<script>
import { defineComponent } from 'vue'
import { createNamespace } from '../utils'
import FanScrollView from '../scroll-view/scroll-view.vue'

export default defineComponent({
  name: createNamespace('DropdownItemContent')[0],
  options: {
    // https://uniapp.dcloud.io/matter.html#mp
    virtualHost: true
  },
  components: { FanScrollView },
  props: {
    scroll: {
      type: Boolean,
      default: false
    },
    scrollHeight: {
      type: [String, Boolean],
      default: '61.8vh'
    }
  }
})
</script>

<template>
  <FanScrollView v-if="scroll" :height="scrollHeight" :scroll-y="true">
    <slot />
  </FanScrollView>
  <slot v-else />
</template>
